package com.LC._709;

class Solution {
    public String toLowerCase(String s) {
        char[] c = s.toCharArray(); // 字符串转换为字符数组
        for (int i = 0; i < c.length; i++) {
            if (c[i] >= 'A' && c[i] <= 'Z') {   // 判断是否大写字母
                c[i] = (char) (c[i] - 'A' + 'a');   // 字符数组中的字符转换为小写
            }
        }
        return new String(c);
    }
    public static void main(String[] args) {
        Solution s = new Solution();
        System.out.println(s.toLowerCase("Hello"));
    }
}
